<?php
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Yansongda\Pay\Pay;

class HomeController
{

    public function index(Request $request){

    }

    /**
     * 支付
     * @param Request $request
     */
    public function Pay(Request $request){
        $data=[
            'openid'=>'xxxxx',
            'total_fee'=>1,
            'out_trade_no'=>unique_no(),
            'notify_url'=>env("APP_URL").'/api/order/notify'
        ];
        $res=Pay::wechat(config("pay.wechat"))->miniapp($data);
        return show_success('支付测试',$res);
    }
}
